<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>表格</title>
    <script src="jquery-3.2.0.min.js">

    </script>
    <style type="text/css">
    table{border-collapse: collapse;}
    table,th,td {
            border: 1px solid #000;
        }
    </style>
</head>
<body>
    <table>
        <thead>
            <th>表头1</th>
            <th>表头2</th>
            <th>表头3</th>
            <th>表头4</th>
            <th>表头5</th>
        </thead>
        <tbody>
            <tr>
                <td>列1</td>
                <td>列2</td>
                <td>列3</td>
                <td>列4</td>
                <td>列5</td>
            </tr>
        </tbody>
        <tbody>

        <tr>
            <td>列1</td>
            <td>列2</td>
            <td>列3</td>
            <td>列4</td>
            <td>列5</td>
        </tr>
        <tr>
            <td>列1</td>
            <td>列2</td>
            <td>列3</td>
            <td>列4</td>
            <td>列5</td>
        </tr>
        <tr>
            <td>列1</td>
            <td>列2</td>
            <td>列3</td>
            <td>列4</td>
            <td>列5</td>
        </tr>
        </tbody>
    </table>
<script>
    $("th").css("background","#fff");
    $("tr:odd").css("background","#0f0");
    $("tr:even").css("background","#0ff");
</script>
</body>

</html>